﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Register.Model;
using Register.IDAL;
using Register.DALFactory;

namespace Register.BLL
{
    /// <summary>
    /// FileName: ParamterHelper.cs
    /// CLRVersion: 4.0.30319.269
    /// Author: WangYan
    /// Corporation: 
    /// Description: 
    /// DateTime: 2012/6/23 21:42:54
    /// </summary>
   public class ParamterHelper
    {
       private static String typeNameKey = "IParamterDALKey";

        /// <summary>
        /// 根据类型获取参数配置列表
        /// </summary>
        /// <param name="type">类型</param>
        /// <returns></returns>
       public static List<Parameter> GetParametersByType(string type)
       {
           IParameter iParamter = DALFactory<IParameter>.Create(typeNameKey);

           return iParamter.GetParametersByType(type);
       }

         /// <summary>
        /// 根据类型和编号获取参数值
        /// </summary>
        /// <param name="type">类型</param>
        /// <param name="ID">编号</param>
        /// <returns></returns>
       public static string GetParameterNameByTypeAndID(string type, string ID)
       {
           IParameter iParamter = DALFactory<IParameter>.Create(typeNameKey);
           return iParamter.GetParameterNameByTypeAndID(type,ID);
       }

    }
}
